/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2023 —11 —06
 * Time: 22:21
 */
public class ceshi {

/*

    //创立一个函数，用if else语句来求得两个值中的较大值
    public static int max2(int x , int y ){
        if( x > y){
            return x;
        }
        else if(x < y){
            return y;
        }
        else {
            return x;
        }
    }
//建立第二个求三个数的最大值，通过调用两次第一个函数，获取三个数中的较大值
    public static int max3(int x , int y , int z ){
        int a = max2(x,y);
        int b = max2(a,z);
        return b;
    }

    public static void main(String[] args) {
        int MAX = max3(12,32,82);
        System.out.println(MAX);
    }


*/


    public static int max2(int x , int y ){
        if( x > y){
            return x;
        }
        else if(x < y){
            return y;
        }
        else {
            return x;
        }
    }
    public static int max2(int x , int y , int z ){
        return max2(max2(x,y),z);
    }

    public static void main(String[] args) {
        int MAX = max2(12,32,82);
        System.out.println(MAX);
    }

}
